* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: linear-gradient(135deg, #0c1426 0%, #1a2332 100%);
    color: #ffffff;
    overflow: hidden;
    height: 100vh;
}

.dashboard {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 顶部标题栏 */
.header {
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid #00d4ff;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left i {
    font-size: 2rem;
    color: #00d4ff;
}

.header-left h1 {
    font-size: 1.8rem;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.datetime {
    font-size: 1.2rem;
    font-weight: 500;
    color: #00d4ff;
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: rgba(0, 212, 255, 0.1);
    border-radius: 20px;
    border: 1px solid #00d4ff;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-dot.online {
    background: #00ff88;
    box-shadow: 0 0 10px #00ff88;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 300px 1fr 300px;
    gap: 20px;
    padding: 20px;
    overflow: hidden;
}

/* 卡片样式 */
.card {
    background: linear-gradient(145deg, #1a2332 0%, #0f1419 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 212, 255, 0.2);
    margin-bottom: 20px;
}

.card h3 {
    color: #00d4ff;
    font-size: 1.1rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3 i {
    font-size: 1.2rem;
}

/* 左侧面板 */
.left-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 系统状态总览 */
.overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.overview-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #00d4ff;
}

.overview-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #ffffff;
    font-size: 1.2rem;
}

.overview-icon.normal {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
}

.overview-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.overview-label {
    font-size: 0.9rem;
    color: #888;
}

.overview-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
}

.overview-value.normal {
    color: #00ff88;
}

/* 报警记录 */
.alarm-log {
    flex: 1;
}

.log-list {
    max-height: 300px;
    overflow-y: auto;
}

.log-item {
    display: flex;
    gap: 15px;
    padding: 12px;
    margin-bottom: 8px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    border-left: 3px solid #00ff88;
}

.log-time {
    font-size: 0.9rem;
    color: #888;
    min-width: 70px;
}

.log-content {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ffffff;
}

.log-content i {
    color: #00ff88;
}

/* 中央面板 */
.center-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 仓库平面图 */
.warehouse-map {
    flex: 1;
}

.map-container {
    height: 100%;
    min-height: 300px;
}

.warehouse-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
    height: 100%;
    padding: 20px;
    background: radial-gradient(circle at center, rgba(0, 212, 255, 0.1) 0%, transparent 70%);
    border-radius: 8px;
}

.zone {
    position: relative;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
    border: 2px solid rgba(0, 212, 255, 0.3);
    border-radius: 8px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zone:hover {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 212, 255, 0.1) 100%);
    border-color: #00d4ff;
    transform: scale(1.02);
}

.zone-label {
    position: absolute;
    top: 10px;
    left: 15px;
    font-weight: 600;
    color: #00d4ff;
    font-size: 1.1rem;
}

.sensors {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    margin-top: 30px;
}

.sensor {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: sensorPulse 3s infinite;
}

.sensor:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
}

.sensor.warning {
    background: linear-gradient(135deg, #ffaa00 0%, #ff8800 100%);
    animation: warningPulse 1s infinite;
}

.sensor.danger {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
    animation: dangerPulse 0.5s infinite;
}

@keyframes sensorPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes warningPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.1); }
}

@keyframes dangerPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}

/* 图表容器 */
.charts-container {
    height: 300px;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    height: 100%;
}

.chart-item {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 15px;
}

.chart-item h4 {
    color: #00d4ff;
    margin-bottom: 10px;
    text-align: center;
}

.chart-item canvas {
    width: 100% !important;
    height: calc(100% - 40px) !important;
}

/* 右侧面板 */
.right-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* 设备状态 */
.device-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.device-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.device-item:hover {
    background: rgba(0, 212, 255, 0.1);
}

.device-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%);
    color: #ffffff;
}

.device-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.device-name {
    font-weight: 600;
    color: #ffffff;
}

.device-status-text {
    font-size: 0.9rem;
    color: #888;
}

.device-status-text.normal {
    color: #00ff88;
}

/* 统计信息 */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 15px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: #00d4ff;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #888;
}

/* 快速操作 */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 15px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border: none;
    border-radius: 8px;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 255, 0.3);
}

.action-btn.emergency {
    background: linear-gradient(135deg, #ff4444 0%, #cc0000 100%);
}

.action-btn.emergency:hover {
    box-shadow: 0 5px 15px rgba(255, 68, 68, 0.3);
}

.action-btn i {
    font-size: 1.2rem;
}

.action-btn span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 1400px) {
    .main-content {
        grid-template-columns: 280px 1fr 280px;
    }
}

@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        overflow-y: auto;
    }
    
    .left-panel, .right-panel {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .center-panel {
        order: -1;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .header-left h1 {
        font-size: 1.4rem;
    }
    
    .main-content {
        padding: 10px;
        gap: 10px;
    }
    
    .left-panel, .right-panel {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .warehouse-layout {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(4, 1fr);
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #0099cc 0%, #007799 100%);
}

